#ifndef IMAGE_H 
#define IMAGE_H

#include "list.h"
#include <iostream>

using namespace std;

// a simple example - you would need to add more funtions

class ImageType {
 public:
   ImageType();
   ImageType(int, int, int);
   void getImageInfo(int&, int&, int&);
   void setImageInfo(int, int, int);
   void setPixelVal(int, int, int);
   void getPixelVal(int, int, int&);
   void threshold( int thresh );
   void erode( ImageType oldImage ); 
   void dilate( ImageType oldImage );
   void getSubImage( int& ULr, int& ULc, int& LRr, int& LRc, ImageType oldImage );
   void rotateImage( float theta, ImageType oldImage ); 
   void reflectImage( bool flag, ImageType oldImage);
   const friend ImageType operator+( ImageType &rhs, ImageType &lhs );
   const ImageType& operator=( const ImageType& rhs );
   void translateImage( int t, const ImageType& oldImage );
   void negativeImage( ImageType oldImage);
   void enlargeImage (int value, ImageType oldImage);
   void shrinkImage (float value, ImageType oldImage);
   int avgImage (ImageType oldImage);
   void subImage ( ImageType oldImage, ImageType oldImage2);

 private:
   int N, M, Q;
   int **pixelValue;
};

class point{

public: 
float x;
float y;
point& operator = (const point &rhs );
bool operator == (const point &rhs ) const;
bool operator != (const point &rhs ) const;


};


class PixelType {
   int x;
   int y;
   int val; 

   public:
   PixelType()
   {
   x = 0;
   y = 0;
   val = 0; 
   }

   PixelType( int a, int b, int c ){
   x = a;
   y = b;
   val = c;
   }
   
   PixelType& operator = (const PixelType &rhs );
   void getValues( int& a, int& b, int& c );
   void setValues( int a, int b, int c ); 
   friend ostream& operator<< (ostream &out, PixelType &P );
   bool operator==( const PixelType &rhs) const;
   bool operator!=( const PixelType &rhs) const;
};

class RegionType{ 

public:
   point centroid;
   UListType<PixelType> pixels; 
   RegionType& operator = (const RegionType &rhs );
   bool operator<( const RegionType &rhs) const;
   bool operator==( const RegionType &rhs) const;
   bool operator!=( const RegionType &rhs) const;
   bool operator>( const RegionType &rhs) const;


};
#endif
